package cn.tuling.ribbon.balancer;

import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.client.naming.core.Balancer;

import java.util.List;

/**
 * 权重负载均衡器：根据权重选择一个服务实例
 */
public class WeightedBalancer extends Balancer {
    public static Instance chooseInstanceByRandomWeight(List<Instance> allInstance) {
        return getHostByRandomWeight(allInstance);
    }
}
